﻿package com.wxsoft.business.sale.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wxsoft.business.model.easyui.PageHelper;

import com.wxsoft.business.sale.dao.ISlOrderLogDao;
import com.wxsoft.business.sale.service.ISlOrderLogService;
import com.wxsoft.business.sale.pojo.SlOrderLog;

@Service("slOrderLogService")
public class SlOrderLogServiceImpl implements ISlOrderLogService  {
	@Resource
	private ISlOrderLogDao dao;
	
	
	public long findCount(SlOrderLog slOrderLog) {
		return dao.findCount(slOrderLog);
	}
	
	public List<SlOrderLog> findAll(PageHelper page,SlOrderLog slOrderLog) {
        List<SlOrderLog> r = dao.findAll(page,slOrderLog);
		return r;
	}
	public List<SlOrderLog> getBy(SlOrderLog slOrderLog) {
        List<SlOrderLog> r = dao.getBy(slOrderLog);
		return r;
	}
	@Transactional
	public String add(SlOrderLog slOrderLog) {
		int r = this.dao.insert(slOrderLog);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	@Transactional
	public String modify(SlOrderLog slOrderLog) {
		int r = this.dao.modify(slOrderLog);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	@Transactional
	public String delete(SlOrderLog slOrderLog) {
		int r = this.dao.delete(slOrderLog);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	
}
